Fix spelling mistake and add cast