Made import more flexible to avoid bugs