Fixed compiler cast warnings in EOS.cpp