drawing config and few bug fixes