Fix state constants generation