fixed js error (problem with json encoding when serving over apache)