Update code from nukeviet (18/07/2014)