Fix capital gain computation for year