Fix skip_space function