Fixed bugs with editing routine and viewing histories