Fix some system functions