Code reordered, works!