fixed null check that enables paste option