Problem with the while and rel operations