bugfix to getExtension