[gcc4.7] added more explicit casts;