Bug and perm fixes, add /LastCommand