Fix stats command deadlock
Fix undefined constant error
Fix index_server_entity initialize problem