Bug fix: Check if negative before updating fn