fixes for handling #{version} cases