class and template fixes
Ref: Comment by sad270 on commit: https://github.com/simpleinvoices/simpleinvoices/commit/5b645fd2dc16a901d78353633d5429b6e34e6fb2#