fixing casting problem with 10.10