Merge controller fix from mongodb to mongoose