avoiding crashing of appointment page