fix some param handling issues