Fixed bug

Changed a, b, c and d on 1345.
Merge pull request #2 from samirarman/1345-bug

Fixed bug