BUG #1974 fixed. Static declaration of blocks and grid size removed.