Debugging information added. Bug fixed