Added some code that should fix the bug introduced by the conflict with Pulse.