some bug-fixes, newtype deriving might work now