fix image bug when hiding sidebar