Fixed type error on bsd