Type error fix