Got rid of some warning using static casts.