small fixes in the code