Code

Fix for gradient code I committed recently (which accidentally used unsigned ints...