Sync code with r28

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Sync code with r29

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>