Update code from nukeviet (01/11/2014)