Update controllers to handle some json edge cases