fixed orientation handling and targetted latest API level