Fix bugs relating with fold opening.