fix build order (and error msg on first build)