Fixing small issue in mergeInterval algorithm