multiple files support fixed, other small fixes