Error control for phase change problems