Bug fixes from gma-api