Minor function changes in engine