fixed small bug in pushstatehelper