Added new function to fix a bug