Fixes for android template generation. First part.