Fix waserror/lock order