fixed a few more bugs