Fixed errors when removing production lines.