Fix some implementation issues