fixed error with wrong orderBy parameter