fix issue #7, #5, #4 / add beforeStatic tests