Fix declaration order error