Fixes and debug print