Fixed bad state to app.lock