Fixed page resize bug