added protection to create invoice