prevent undefined error if sort isnt set