Fixed bug caused by previous commit

Inclusion and execution were not in proper order which lead to undefined
function errors