fix to require protocols before class import