Fixed some more bugs for BZ#1013886