Oops fixed misplaced code