fix all bugs due to merge