fixed a bug from view history prescription