Bug fixes to sample page