FIX: casting int from xml attributes

Fixed a bug that would make the program crash when values that are not numbers were parsed as integers from the xml attributes.