Fixed seweral bugs on server