added error message when variable sort is not supported