fixed a few issues with cmd line