attempting to fix some neverending whiles