few bug fixing