Better error message and fixed browser performance problem