Different bugs fixed