Fixed legacy scripts