Changed the order in which I do things a little