Added boolean check