Fixes plugin environment preparation