Attempted fixes (NON working)

fixes to try and work towards getting functions with while loops inside
to work