fixes a few integration bugs and variable checks