Correct static cast mistake