fixed backend bugs