fixed weird cast