Adding static cast

Adding static_cast as required by xcode Version 4.6 (4H127)