Fixed some things, and stuff... :P
Fixed infinite loop