Fixed the CreatePill bug