Fixed several bugs to work on Ying servers