fixed check for extension