Fixing bug in autoplace.
Fixes issue #260.