fixed a couple small bugs