small fixes in code