Fixing some bugs :P