several small fixes
Time problem fixed