misc parsing fixes, from comparisons to uglify