Minor changes for compatibility with Android Lollipop