Added max blocks constraint. See macro in kernel.h