Fixed bug with get_extension