fixes #177; removed bad reference and simplified calculation

this is the PR for the fix for the RC that has in parallel been submitted to master.