Fixed bug in reverse