Fixed errors with SESSION in error handlers (40x and 50x).