fix errors and url change events