Improve the code as suggested by Christian Schoenebeck. Signed-off-by: Mathias Kresin <dev@kresin.me>