Fixes for UIDevice