bug fixes in languages

http://jsfiddle.net/DoZer/qb0wq01o/15/