Fixed casting bug.