Added license and potentially fixed crash bug.

Signed-off-by: retep998 <retep998@verizon.net>