fixed if statement bug for validation to check > -1