Fix some bugs. Step 1.

https://bugzilla.redhat.com/show_bug.cgi?id=947071