Fixed the loop thing