fixed localization issues
fixed a number of small bugs