Added random system command
Fixed error when SMA isn't known'