fixed bug which crashed server when