Fix int ptr cast from void ptr