Fixed resize bugs and jshint issues.