fix weird locked behaviour