fixed matching of eof
added protocol from 13.06.2013