fix crash when unknown extension given

fixes #6