fixed code for non-IE7 browsers & simplified patch