adding pagebeforehide to empty #courses element