Revert changes for remainFrame in #1776.