bug fix static magic functions building