Correct unshift command and clean up