Fix init extension only if necessary

Try to fix #25