Fixes timezone bug and arithmetic overflow