Fixes 'Non-static method should not be called statically' error.