Fixed some issues with run command and with metadata