Fixed errors because of changed made in getOrientation and getId