issues with preference and orietation change resolved