adds proper toolbar lock, fixes #2306