fixed global affecting problems