Fixed bug with ending in a dd