Fixed the bug of negative hours