Bug: fix console detection, thanks Ryan Maxwell