Fix minor bug

Fix a bug in the way a method is called which causes the program to crash.