Casted everything to the type we were allocating