Fix copy and paste error

Fix error 8 and 9 identified by static analysis from
http://www.viva64.com/en/b/0251/

Change-Id: I7f6741513814d8707e9dfe3402f970696238b8a3
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>