Right code, wrong place