Fixes bugs with console