bugs fixing when merging