hacks to deal with setPosition bug