Corrected resizing and hiding/showing for simulator.