fixed linux support + added smooth function on spawn