Fixed logic bug in PE resources
Fixed leftover old session functions