Fix some func