fix(crash): pointer cast is incorrect