Fixed issue with extension check and a test.