Restored backwards compatibility and fix test