Fixed returnAdvice funtcion

Added missing brackets to while statements