Fix nine patch gen bugs #12 and #14