Fix bug in prev committed script