Fixed type cast warnings in mac app