Added legacy code to avoid GCC warnings