Update code from nukeviet (02/08/2014)