From Sven-Ola Tuecke <sven-ola@gmx.de>: minor fixed point math bugfix/optimization