fix bug in buildin function