Added code to prevent blind-refreshes