fixing up resize handler with deferred layout setup