make sure extension is not included in variable