fixes build dir and minor fixes