fixed type error and copy to clipboard feature