fixbug: exception while casting byte array to Long

Exception thrown while casting byte array to Long in BuildFactory.java