more django orm fixes