Fixed server crash
Minor changes