Fixed some odd backend bugs