fixing last bits