fix atom generation