Again, fixed bugs with jason's code