fix negative value issue