fixes for scalar param bugs