fixed a crashing bug in libintegra