Fixing remote sensor mananger null pointer access

Also adding more checks and asertions and decreasing a bit size of generated binary