Fixed a javascript error passing silently and not notifying the user what happened.