Fix several problems mentioned in push-request 716

Signed-off-by: Yanbing Du <ydu@redhat.com>