Fixed xss issue
Fixed framefreeze and other various errors