Added missing the "$this->" in line 428 and trimmed trailing whitespace. Closes #531