fixed a bug in #merge (gah!)