Fixed issues and made the engine runs smoothly.