fix image rati while switching between themes