Fix core logic for version 0.4.0 of source.