Few bug fixing