Minor bug fixed and debug removed