Bug involving incorrect get_extension() usage