compile on linux, bug fixes