Fix #7 from Sanjo - include upsert in stub