little fixes && type-casts