fixed two search&replace bugs ;)