fixed a few last bugs