fixed core/helper.c and added a new test