fixed some buggy stuff with ipn