Fixed setPosition with alignment.

closes #2366