* Fixed some issues with loops