CQLB update

Based on patch from Lotem.