fix page delete function