quick hack to handle invalid json requests (will change soon)