add some corrections to raw input