moved up to avoid errors on migrations