fixed reverse bug