Fix code for farm