fixes to backend