fixed bugs due to merge