Fixed some bugs(json_encode on earlier php versions fixed)
Merge remote-tracking branch 'origin/master'