Tried to fix cross machine problem with remainder check