fixed integration errors