[dx51] better caps code and fix last seen compilations problems