fix bug where nothing is returned if params are empty