Don't crash on invalid language

Fix #52