fixed the cast and incompatible pointer warning