fixed some errors from site transformation