Move stuff around to fix compile error