Some little fixes for the primal project