First attempt at fixes for Issues 15 and 16