0.4 locale fix

Should be merged up to master too.