BE fixes 

removed type casts that caused test failure on BE(64bit)
Ok then :)