Fixed trailing '.' bug