Fixing onclick issue