Some bugs are fixed