fixed some issues with the previous commit