fix if statment