Final bugs fixed