Fixed trim_start()/trim_end() functions.