This is getting closer to the correct behavior.