Minor Bugs fixes