Code

Fixed lock handling for macros.