small fixes and debug statements added