Fixed protocols behavior. Fixes crash on Windows XP and makes protocols work there. Resolves issue #24 .