fixed most of the really glaring bugs