fixed bug that crashed server