Most param replacement bugs corrected, except that the param replacement is not working for monoparam blocks (like trigonometric blocks).