Type error fixed