ensure proper lengths of phashes