avoid division by zero on certain platforms