fixed more bugs with php to js bootstrapping