fix nil hash condition