fixed Issues 38 and 49