fix console code