fixed bugs Jon added at the last second