fixed bug with constructor from file