per Brad - added the lock thing. per Alex - move debugger