Patch for bug sumbit by Nabeel