Merge pull request #199 from tablatronix/master

fixes cross browser inconsistent mode switching
fixes #200
handles empty strings in active.php json
Not sure of actual cause.