Fixed eat function. It completely works now.