Fixes #699: fixed wrong usage of self and static