added checkActive() call on window.resize