Fixing some errors.
merged some changes