Returns tab and other logic fixes.