Some improvements

unfortunately I have no time to test it in the next two days...