fixed bad patch application