Fixed some odd code