Correcting extracting number from result