fix casting bug