fixes some bugs with the look routine