Bug fixes & minor change