Fixes bug with turning off key manager