minor fix to release resources