Fixed issue found in the last commit

Simple as flipping the code execution order.