Bug fixing 296 and 301