Trying to fix if statment