Reverting code back to the correct implementation after changes in starcounter were made. Starcounter version 2.0.2536.3 or later needed for it to work correctly.