Add support to Ubuntu and fix errors