Fix of follwoing issues #38, #39