Fix issues with command templates