fix signature generation for productions with empty rhs