Fixed bug with mode == block