Correction in COde

While integration some errors occured. Especially converting between
datatypes