changed: Changed the logic some more