Handling now accepts json properly