Fixed macro defining layer-moving functions.