Some bugs solved