remove white spaces before saving