Squashed commit of the following:

commit 20fca14ad5f4bfd1f618cb9dd58287828255c219
Author: Heiko Strathmann <heiko.strathmann@gmail.com>
Date:   Thu Mar 14 17:38:03 2013 +0000

    really fixed it now

commit 35cbc5149b6e997ba5c38c1250c652c0ab4b851b
Author: Heiko Strathmann <heiko.strathmann@gmail.com>
Date:   Thu Mar 14 17:32:22 2013 +0000

    fixed memory errors and added asserts again
Merge pull request #937 from karlnapf/master

fixed and enabled GPR unit test