Changed orientation listener, because it was deprecated by Android.