Fix for #529
Fix for #526
fixed broken build