Fixed problem caused by moving routine