fixed a few bugs with the ctr z feature