Changed to debug mode and fixed issue #1