Fixed Apple specific issues

Signed-off-by: Tal Kain <tal.kain@ravellosystems.com>