Tweak location of objectMode check. For #2255