fix a bunch of stuff regarding locks and preventing access to actions when required @jellewie