imp master fix (anyway logic was almost useless)