Bug fixes in memory manager and process scheduler