fixed some issues with previous commit