If statment error fixed