Fixes to modal.fit