fixes for https://github.com/wordnik/swagger-js/issues/107