Fix for negative numbers