Fix constant replacing