Fixed a bug and made json posts possible