Fixed infinite loop if some parametr was missing