fixed broken invalid sign in logic