fixing empcreatefunc