Fix some errors which only appear in server console