fixed bug that caused 400 errors