fix constants generation