fix negative handling