Fixed bug where a NullPointerException would occur if there werent any
variables