Fixed issue with Return command inside loops.