fix reverse drawing problem