fixed a couple more bugs