fixing the previous state