Fix for bug while appending extension