More bug fixes

- Added more debugging