Catch RuntimeException when unlocking to prevent crash