fixed rewrite issue with library