Handle package build
Changed order of compilation
Small bug fix