Fixed some bugs

O.o Let me continue tomorrow.