Squashed commit of the following:

commit dfe6eb286c7b8ffec1ec62df1ec7261dbf5aba4a
Author: Matt Dwen <matt@group6.co.nz>
Date:   Mon Aug 12 16:57:06 2013 +1200

    Fix 2.

commit 7dfb455e30d99ed042cfc9d8e56cb4a08af32604
Author: Matt Dwen <matt@group6.co.nz>
Date:   Mon Aug 12 16:55:42 2013 +1200

    Bug #123 fix 1.