Eluna reimplement lock and improve hook handling