Fix console accepts input when hidden