Fixed bug when consuming messages with external lock manager. Formatted code.