Fixing bugs

Hi, I fixed the bug I posted before #38