made a minor fix to prevent window messages from calling the hook stuff too often and causing performance issues