Fix warning (from Victor)
remove deprected warnings until we can move to non deprecated api
cast away enum warnings