Update code from nukeviet (07/05/2014)