Adding missing files and fixing a crash bug after create