Feature/fixes

Fixed some bugs in a one line script.