Fixed nullpointerexception in readData caused by I'm stupid/Bad language design.