fixed captche generate function