fixed a few bugs :D