#131 fixed extension handling