fixed type-errors