Update code from nukeviet (01/12/2014)