Adding some logic for backward compatibility