Some little changes and bug fixes