Fixed XOR, by fixing weight initializations. Also fixed bug in gradient check.