Fixed the last deprecation warnings for order and where