some fixes to backend