Solved a small NullPointerException in the code I wrote.