minor bug fixes: currently NOT STABLE and NOT WORKING