Fix bugs on project build