fixing some bugs in the console