Trimming bug fixed

Signed-off-by: Fernando Serrano <ferserc1@gmail.com>